Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labs:lab03: Add hosts in /etc/hosts at build time correctly #6

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

VladNastase
Copy link
Contributor

Build for openvpn-client1 and openvpn-client2 containers was failing with /bin/sh: 1: cannot create /etc/hosts: Read-only file system.

According to the documentation, Docker may live update /etc/hosts. While the documentation also states that it can end up in an incomplete or corrupted state, it looks like in recent versions the file is made read-only.

This fix uses the extra-hosts option for docker compose (equivalent to the CLI option --add-hosts) to properly add entries to the /etc/hosts file.

@VladNastase VladNastase added the bug Something isn't working label Nov 2, 2023
@Sergiu121 Sergiu121 merged commit 9b076ff into systems-cs-pub-ro:master Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants